<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input type="text" placeholder="输入账户名" />
    <button>submit</button>

    <script src="./01_防抖基本实现.js"></script>
    <script>
      let fetchFn = function (...args) {
        console.log("网络请求~", this, args);
      };
      //3进行函数防抖化
      let debounceFn = debounce(fetchFn, 500);

      let input = document.querySelector("input");
      //触发的事件
      input.addEventListener("input", debounceFn);
    </script>
  </body>
</html>
